<html>
<head>
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title>Off Canvas Template for Bootstrap</title>

    <!-- Bootstrap core CSS -->
    <link href="assets/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="assets/css/offcanvas.css" rel="stylesheet">
    <link href="assets/css/style.css" rel="stylesheet">
    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]>
    <script src="assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <script src="assets/js/ie-emulation-modes-warning.js"></script>
</head>
<body>
<nav class="navbar navbar-fixed-top navbar-inverse">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
     
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav">
            <li><a href="index.php?c=index&m=index">首页</a></li>
            <li><a href="index.php?c=index&m=listall&tid=1">川菜</a></li>
            <li><a href="index.php?c=index&m=listall&tid=2">徽菜</a></li>
            <li><a href="index.php?c=index&m=listall&tid=3">鲁菜</a></li>
            <li><a href="index.php?c=index&m=listall&tid=4">闽菜</a></li>
            <li><a href="index.php?c=index&m=listall&tid=5">苏菜</a></li>
            <li><a href="index.php?c=index&m=listall&tid=6">湘菜</a></li>
            <li><a href="index.php?c=index&m=listall&tid=7">粤菜</a></li>
            <li><a href="index.php?c=index&m=listall&tid=8">浙菜</a></li>
        </ul>
        <ul class="nav navbar-nav navbar-right">
              <?php session_start(); 
              if(isset($_SESSION["uname"])){ ?>
              <li><a href="index.php?c=index&m=logout">注销</a></li>
              <li><a href="index.php?c=index&m=reguser">注册</a></li>
              <li class="active"><a href="#" >欢迎 
              
                 <?php echo " ".$_SESSION["uname"]." ";}
                else {?> 
              <li role="presentation"><a href="index.php?c=index&m=login">登陆</a></li>
              <li role="presentation"><a href="index.php?c=index&m=reguser">注册</a></li>
              <li class="active"><a href="#" >欢迎  
                <?php echo "您";}
                 ?>访问本站</a></li>
        </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
     <?php $row=$data['content'];?>
<div class="container">

    <div class="row row-offcanvas row-offcanvas-right">

        <div class="col-xs-12 col-sm-12">


            <div class="row box">
                        <div class="col-md-4 text-center">
                            <img src="upload/<?php echo $row["pic"]; ?>" width="200" height="250">
                            
                            <h3>
                            <?php echo $row["foodname"]; ?>
                            </h3>
                        </div>
                        <div class="theme-popover-mask"></div>
                <div class="col-md-8 text-center">
                    <table class="table">
                      <tr>
                      <td>美食名称</td>
                      <td><?php echo $row['foodname'];?></td>
                      </tr>

                      <tr>
                      <td>美食类型</td>
                      <td><?php 
                             switch ($row['tid']) {
                                    case '1':
                                      echo "川菜";
                                    break;
                                    case '2':
                                      echo "徽菜";
                                    break;
                                    case '3':
                                      echo "鲁菜";
                                    break;
                                    case '4':
                                      echo "闽菜";
                                    break;
                                    case '5':
                                      echo "苏菜";
                                    break;
                                    case '6':
                                      echo "湘菜";
                                    break;
                                    case '7':
                                      echo "粤菜";
                                    break;
                                    case '8':
                                      echo "浙江菜";
                                    break;
                                    default:
                                      echo "其它";
                                    break;
                                    }
                          ?></td>
                      </tr>


                      <tr>
                      <td>点击次数</td>
                      <td><?php echo $row['hittimes'];?></td>
                      </tr>

                    </table>
                  </div>
                </div>

            <div class="row box">
                <div class="col-lg-12">
                    <h3 class="intro-text text-center">内容简介</h3>
                        <?php echo $row["intro"]; ?>
                </div>
            </div>
        </div>
    </div>
        <!--/.col-xs-12.col-sm-12-->

       
    </div>
    <!--/row-->

    

</div>
</body>
</html>
